package main

import (
	"fmt"
	"log"
)

func starts() {
	var ans = []Animal{Dog{}, Cat{}}
	for k, v := range ans {
		v.Speak()
		fmt.Printf("k==%d,v==%d", k, v)
	}
}

type Animal interface {
	Speak() string
}
type Dog struct {
}

func (d Dog) Speak() string {
	log.Println("Dog Speak")
	return "sdyid"
}

type Cat struct{}

func (c Cat) Speak() string {
	log.Println("Cat Speak")
	return "Speak"
}
